using System;
using System.Collections.Generic;

namespace e0829
{
	class MainClass
	{
		public static void Main (string[] args)
		{
/*
			// Fibonnaci			
			int a=0;
			int b=1;
			for( int n=0; n<25; n+=1 )
			{
				int c=b;
				b += a;
				a = c;
				Console.WriteLine("{0}: {1}", n, b);
			}
*/

/*
			// Read number and print that number of astriks
			Console.Write("Give me a number:");
			string str=Console.ReadLine();
			try
			{
				int a = Convert.ToInt32(str);
				Console.Write("{0} astriks: ", a);
				for( int n=0; n<a; n+=1 )
				{
					Console.Write("*");
				}
				Console.WriteLine(" - done");
			}
			catch(Exception)
			{
				Console.WriteLine("That was not a number");
			}
*/
			
/*
			// Read two numbers and find the largest common denomitor
			int a, b;
			Console.Write("Give me a number:");
			string str = Console.ReadLine();
			try { a=Convert.ToInt32(str); }
			catch( Exception ) { Console.WriteLine("That was not a number"); return; }
			Console.Write("Give me another number:");
			str = Console.ReadLine();
			try { b=Convert.ToInt32(str); }
			catch( Exception ) { Console.WriteLine("That was not a number"); return; }
			int c=Math.Min(a,b);
			while( a%c!=0 || b%c!=0 )
			{
				c-=1;
			}
			Console.WriteLine("The largest common denomitor of {0} and {1} is {2}", a, b, c );
*/
			
/*
			// Read a number of numbers and write the largest common denomitor
			List<int> numbers = new List<int>();
			Console.WriteLine("This program will calculate the largest common denomitor of a series of numbers");
			Console.WriteLine("Write as many numbers as you like, end list with an empty line");
			for(;;)
			{
				Console.Write("?");
				string str = Console.ReadLine();
				if( str == null || str.Equals("") ) break;
				try
				{
					numbers.Add(Convert.ToInt32(str));
				}
				catch(Exception)
				{
					Console.WriteLine("That was not a number");
				}
			}
			int c=0;
			foreach( int i in numbers )
			{
				Console.Write("{0} ", i);
				c = Math.Max(i, c);
			}
			Console.WriteLine("");
			bool found;
			do
			{
				found = true;
				foreach( int i in numbers )
				{
					if( i%c != 0 )
					{
						found = false;
						c -= 1;
						break;
					}
				}
			} while( !found );
			Console.Write("The largest common denomitor of < ");
			foreach( int i in numbers )
			{
				Console.Write("{0} ", i);
			}
			Console.WriteLine("> is {0}", c);
*/
		}
	}
}

